<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <img src="545646464" alt="图片" data-bigsrc="hdhhshshdhha" data-size="120*566">
    <script>
        var app=document.querySelector("img");
        var data=app.dataset;//获取自定义属性  data
        console.log(data);
        window.onload=function(){
            app.src=data.bigsrc;
        }

    </script>
</body>
</html>